package blobs

import (
	"gitee.com/djaf/my-certs/app/data/dxo"
	"gitee.com/djaf/my-certs/app/data/entity"
	"gorm.io/gorm"
)

// DAO ...
type DAO interface {
	Insert(db *gorm.DB, item *entity.BLOB) (*entity.BLOB, error)

	Update(db *gorm.DB, id dxo.BlobID, fn func(item *entity.BLOB)) (*entity.BLOB, error)

	Remove(db *gorm.DB, id dxo.BlobID) error

	Find(db *gorm.DB, id dxo.BlobID) (*entity.BLOB, error)

	List(db *gorm.DB, q *Query) ([]*entity.BLOB, error)
}
